/********************************************************************

Write Date: 2011/07/29
Author: Deng Nianchen
>>>> Add class StreamReader

*********************************************************************/
#ifndef STREAMREADER_H
#define STREAMREADER_H
#include "oopobject.h"
#include "ByteArray.hpp"
#include "OOPPtr.hpp"



_OOPUTILS_BEGIN



/**************************************************************************************************
 * <summary> Purpose: Provide support for config files.
 *					 A config file is a file with many lines of text. each line 
 *					 contains a key and a value, which is joined by '='.
 *					 An example file is as follow:
 *					 windowWidth=800
 *					 windowHeight=600
 * 					 Thread-Safe: the class is not thread-safe. </summary>
 * 
 * <remarks>  Deng Nianchen, 2011/04/10. </remarks>
 **************************************************************************************************/

class StreamReader : public OOPObject
{
public:

	virtual OOPPtr< ByteArray > read (size_t count) = 0;
	virtual size_t getPos () = 0;
	virtual void skip (size_t count) = 0;
	virtual void resetPos () = 0;
	virtual void setPos (size_t pos) = 0;
	virtual bool isEof () = 0;

};


_OOPUTILS_END
#endif
